<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:c="http://java.sun.com/jsp/jstl/core">

<ui:composition template="./masterpage/masterpage.xhtml">
	<ui:define name="title">Pending Transfer</ui:define>
	<ui:define name="content">
		<h:form>
			<div class="title"><h3>List of pending transaction</h3></div>
			<div id="transferPage" style= "height:600px; overflow:auto">
			<f:param value="#{transferMoneyManageBean.showtxsize}" id="size"></f:param>
			<c:choose>	
				<c:when test="#{transferMoneyManageBean.showtxsize == 0}">
					<h2>Your account has no pending transactions!</h2>
				</c:when>
				<c:otherwise>
					<table width="800">
						<tr>
							<th></th>
							<th>Account Number&nbsp;&nbsp;</th>
							<th>Transaction ID&nbsp;&nbsp;&nbsp;</th>
							<th>&nbsp;&nbsp;Receiver ID</th>
							<th>Receiver name</th>
							<th>&nbsp;&nbsp;Amount</th>
							<th>Begin Time</th>
						</tr>
						<ui:repeat var="s" value= "#{transferMoneyManageBean.showtx}" varStatus="status" >
							<tr>
								<td><h3><h:outputText value="#{status.index +1}"/></h3></td>
								<td><h:outputText value= "#{s.depositAccountNumber}" /></td>
								<td><h:outputText value= "#{s.transactionID}" /></td>
								<td><h:outputText value= "#{s.receiverID}" /></td>
								<td><h:outputText value= "#{s.lastName} #{s.midName} #{s.firstName}"/></td>
								<td><h:outputText value= "#{s.funds}" >
								<f:convertNumber currencySymbol="" groupingUsed="true"
                    			 maxFractionDigits="0" type="currency" /></h:outputText> VND</td>
								<td><h:outputText value= "#{s.beginTime}" /></td>
							</tr>
						</ui:repeat>
					</table>
				</c:otherwise>
			</c:choose>
			</div>
		</h:form>
	</ui:define>
</ui:composition>
</html>